package com.geekgo.flowcontroller.core.converter;

import java.lang.reflect.Array;

/**
 * @author geekgo
 * @version 2016/8/4 17:49
 */
public class ArrayLengthRateConverter extends IndexArgRateConverter {

    public ArrayLengthRateConverter(int argIndex) {
        super(argIndex);
    }

    @Override
    public int acquire(Object[] args) {
        Object array = args[getArgIndex()];
        return Array.getLength(array);
    }
}
